from flask import render_template

class Errorhd():
    @staticmethod
    def errorhd(app):
        #错误处理静态方法

        @app.errorhandler(404)
        def miss(e):
            return render_template('404.html',errortext=e), 404


        @app.errorhandler(500)
        def miss(e):
            return render_template('500.html',errortext=e), 500

        @app.errorhandler(401)
        def miss(e):
            return render_template('401.html',errortext=e), 401
        
        @app.errorhandler(403)
        def miss(e):
            return render_template('403.html',errortext=e), 403
